home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / doc / draft-uri-url-03.txt.Z / draft-uri-url-03.txt
Encoding:
Text File  |  1994-03-27  |  42.6 KB  |  1,104 lines

  1. Uniform Resource Locators (URL)                 Tim Berners-Lee
  2. draft-ietf-uri-url-03.{ps,txt}                URI working Group
  3. Expires 21 September 1994                         21 March 1994
  4.  
  5.  
  6.                   Uniform Resource Locators (URL)
  7.                 
  8.                   A Syntax for the Expression of
  9.              Access Information of Objects on the Network
  10.  
  11.  
  12.                          ABOUT THIS DOCUMENT
  13.                                    
  14.    This document specifies a Uniform Resource Locator (URL), the
  15.    syntax and semantics of formalized information for location and
  16.    access of resources on the Internet.
  17.    
  18.    This document was written by the URI working group of the Internet
  19.    Engineering Task Force.  Comments may be addressed to the editor,
  20.    Tim Berners-Lee <timbl@info.cern.ch>, or to the URI-WG
  21.    <uri@bunyip.com>. Discussions of the group are archived at 
  22.    
  23.   <http://www.acl.lanl.gov/URI/archive/uri-archive.index.html>
  24.  
  25.    This document is bound by the Requirements Specification in
  26.    preparation.
  27.    
  28.    The work is derived from concepts introduced by the World-Wide Web
  29.    global information initiative,  whose use of  such objects dates
  30.    from 1990 and is described in "Universal Resource identifeirs for
  31.    the World-Wide Web", RFCXXX .
  32.    
  33.    This document is available in hypertext form, with links to
  34.    background information, as: 
  35.    
  36.   <http://info.cern.ch/hypertext/WWW/Addressing/URL/Overview.html>
  37.  
  38.    .
  39.    
  40.   STATUS OF THIS MEMO
  41.   
  42.    This document is an Internet Draft. Internet Drafts are working
  43.    documents of the Internet Engineering Task Force (IETF), its Areas,
  44.    and its Working Groups.  Note that other groups may also distribute
  45.    working documents as Internet Drafts.  
  46.    
  47.    Internet Drafts are working documents valid for a maximum of six
  48.    months. Internet Drafts may be updated, replaced, or obsoleted by
  49.    other documents at any time.  It is not appropriate to use Internet
  50.    Drafts as reference material or to cite them other than as a
  51.    "working draft" or "work in progress".  
  52.    
  53.    Distribution of this document is unlimited. 
  54.  
  55.  
  56.  
  57. Berners-Lee                                                          1
  58.  
  59. Recommendations
  60.  
  61.    This section describes the syntax for "Uniform Resource Locators"
  62.    (URLs): that is, basically physical addresses of objects which are
  63.    retrievable using protocols already deployed on the net.  The
  64.    generic syntax provides a framework for new schemes for names to be
  65.    resolved using as yet undefined protocols.  
  66.    
  67.    The syntax is described in two parts. Firstly, we give the syntax
  68.    rules of a completely specified name; secondly, we give the rules
  69.    under which parts of the name may be omitted in a well-defined
  70.    context. 
  71.    
  72.   URL SYNTAX  
  73.   
  74.    A complete URL consists of a naming scheme specifier followed by a
  75.    string whose format is a function of the naming scheme. For
  76.    locators of information on the internet, a common syntax is used
  77.    for the  IP address part. A BNF description of the URL syntax is
  78.    given in an a later section. The components are as follows. 
  79.    Fragment identifiers and partial URLs are not involved in the basic
  80.    URL definition. 
  81.    
  82.     PrePrefix
  83.     
  84.    To be a Uniform Resource Locator as currently defined by the URI
  85.    working group, the whole string must start with a constant prefix
  86.    "URL:". Note that to save space in this document, some URLs may
  87.    have been quoted throughout without this preprefix. 
  88.    
  89.     Scheme  
  90.     
  91.    Within the URL of a object, the first element is the name of the
  92.    scheme, separated from the rest of the object by a colon. The rest
  93.    of the URL follows the colon in a format depending on the scheme. 
  94.    
  95.     Internet protocol parts  
  96.     
  97.    Those schemes which refer to internet protocols mostly have a
  98.    common syntax for the rest of the object name. This starts with a
  99.    double slash "//" to indicate its presence, and continues until the
  100.    following slash "/".  Within that section are   
  101.    
  102.   An optional user name, 
  103.                           if required (as it is with a few FTP
  104.                          servers). The password, is present, follows
  105.                          the user name, separated from it by a colon;
  106.                          the user name and optional password are
  107.                          followed by a commercial at sign "@".  The
  108.                          user of user name and passwords which are
  109.                          public is discouraged. 
  110.                          
  111.   The internet domain name 
  112.  
  113.  
  114.  
  115. Berners-Lee                                                          2
  116.  
  117.                           of the host in RFC1037 format (or,
  118.                          optionally and less advisably, the IP address
  119.                          as a set of four decimal digits) 
  120.                          
  121.   The port number,        if it is not the default number for the
  122.                          protocol, is given in decimal notation after
  123.                          a colon. 
  124.                          
  125.   Path                    The rest of the locator is known as the
  126.                          "path". It may define details of how the
  127.                          client should communicate with the server,
  128.                          including information to be passed
  129.                          transparently to the server without any
  130.                          processing by the client.   
  131.                          
  132.    The path is interpreted in a manner dependent on the scheme being
  133.    used. Generally, the slash  "/" (ASCII 2F hex) denotes a level in a
  134.    hierarchical structure, the higher level part to the left of the
  135.    slash. 
  136.    
  137.   ENCODING PROHIBITED CHARACTERS
  138.   
  139.    When a system uses a local addressing scheme, it is useful to
  140.    provide a mapping from local addresses into URLs so that references
  141.    to objects within the addressing scheme may be referred to
  142.    globally, and possibly accessed through gateway servers.
  143.    
  144.    Any mapping scheme may be defined provided it is unambiguous,
  145.    reversible, and provides valid URLs. It is recommended that where
  146.    hierarchical aspects to the local naming scheme exist, they be
  147.    mapped onto the hierarchical URL path syntax in order to allow the
  148.    partial form to be used.  
  149.    
  150.    The following encoding method shall be used for mapping WAIS, FTP,
  151.    Prospero and Gopher addresses onto URLs. Where the local naming
  152.    scheme uses characters which are not allowed in the URL,  these may
  153.    be represented in the URL by a percent sign "%" followed by two
  154.    hexadecimal digits (0-9, A-F) giving the ISO Latin 1 code for that
  155.    character.  Character codes other than those allowed by the syntax
  156.    shall not be used unencoded in a URL. 
  157.    
  158.    The same encoding method may be used for encoding characters whose
  159.    use, although technically allowed in a URL, would be unwise due to
  160.    problems of corruption by imperfect gateways or misrepresentation
  161.    due to the use of variant character sets, or which would simply be
  162.    awkward in a given environment.  Because a % sign always indicates
  163.    an encoded character, a URL may be made safer simply by encoding
  164.    any characters considered unsafe, while leaving already encoded
  165.    characters still encoded.  Similarly, in cases where a larger set
  166.    of characters is acceptable, % signs can be selectively and
  167.    reversibly expanded.
  168.    
  169. Specific Schemes  
  170.  
  171.  
  172.  
  173. Berners-Lee                                                          3
  174.  
  175.    The mapping for some existing standard and experimental protocols
  176.    is outlined in the BNF syntax definition .  Notes on particular
  177.    protocols follow. The schemes covered are 
  178.    
  179.   http                    Hypertext Transfer Protocol 
  180.                          
  181.   ftp                     File Transfer protocol 
  182.                          
  183.   gopher                  The Gopher protocol 
  184.                          
  185.   mailto                  Electronic mail address 
  186.                          
  187.   mid                     Message identifiers for electronic mail 
  188.                          
  189.   cid                     Content identifiers for MIME body part 
  190.                          
  191.   news                    Usenet news 
  192.                          
  193.   nntp                    Usenet news for local NNTP access only 
  194.                          
  195.   prospero                Access using the prospero protocols 
  196.                          
  197.   telnet , rlogin and tn3270 
  198.                           Reference to interactive sessions 
  199.                          
  200.   wais                    Wide Area Information Servers 
  201.                          
  202.    Other schemes may be specified by future specifications
  203.    
  204.    New schemes may be registered at a later time.
  205.    
  206.   FTP  
  207.   
  208.    The ftp: prefix indicates that the FTP protocol is used, as defined
  209.    in RFC957 or any successor. The port number, if present, gives the
  210.    port of the FTP server if not the FTP default.  
  211.    
  212.       User name and password
  213.       
  214.    The syntax allows for the inclusion of a user name and even a
  215.    password for those systems which do not use the anonymous FTP
  216.    convention. The default, however, if no user or password is
  217.    supplied, will be to use that convention, viz. that the user name
  218.    is "anonymous" and the password the user's Internet-style mail
  219.    address .
  220.    
  221.    Where possible, this mail address should correspond to a usable
  222.    mail address for the user, and preferably give a DNS host name
  223.    which resolves to the IP address of the client. Note that servers
  224.    currently vary in their treatment of the anonymous password.  
  225.    
  226.       Path
  227.       
  228.  
  229.  
  230.  
  231. Berners-Lee                                                          4
  232.  
  233.    The FTP protocol allows for a sequence of CWD commands (change
  234.    working directory) and a TYPE command prior to  service commands
  235.    such as RETR (retrieve) or NLIST  (etc) which actually access a
  236.    file. 
  237.    
  238.    The arguments of any CWD commands are successive segment parts of
  239.    the URL delimited by slash, and the final segment is suitable as
  240.    the filename argument to the RETR command for retrieval or the
  241.    directory argument to NLIST.
  242.    
  243.    For some file systems (Unix in particular), the "/" used to denote
  244.    the hierarchical structure of the URL corresponds to the delimiter
  245.    used to construct a file name hierarchy, and thus, the filename
  246.    will look the same as the URL path. This does NOT mean that the URL
  247.    is a Unix filename. 
  248.    
  249.         Note: Retrieving subsequent URLs from the same host
  250.         
  251.    There is no common hierarchical model to the FTP protocol, so if a
  252.    directory change command has been given, it is impossible in
  253.    general to deduce what sequence should be given to navigate to
  254.    another directory for a second retrieval, if the paths are
  255.    different.  The only reliable algorithm is to disconnect and
  256.    reestablish the control connection.   
  257.    
  258.       Data type
  259.       
  260.    The data content type of a file can only, in the general FTP case,
  261.    be deduced from the name, normally the suffix of the name. This is
  262.    not standardized. An alternative is for it to be transferred in
  263.    information outside the URL. A suitable FTP transfer type (for
  264.    example binary "I"  or text "A") must in turn be deduced from the
  265.    data content type.  It is recommended that conventions for suffixes
  266.    of public archives be established, but it is outside the scope of
  267.    this standard.
  268.    
  269.    An FTP URL may optionally specify the FTP data transfer type by
  270.    which an object is to be retrieved. Two of the methods correspond
  271.    to the FTP "Data Types" ASCII and IMAGE for the retrieval of a
  272.    document, as specified in FTP by the TYPE command . One method
  273.    indicates directory access.
  274.    
  275.    The data type is specified by a suffix to the URL. Possible
  276.    suffixes are: 
  277.    
  278.   ;type = <type-code>     Use FTP type as given  to perform data
  279.                          transfer. 
  280.                          
  281.   ;type=d                 Use FTP directory list commands to read
  282.                          directory 
  283.                          
  284.    The type code is in the format defined in RFC959. 
  285.    
  286.  
  287.  
  288.  
  289. Berners-Lee                                                          5
  290.  
  291.       Transfer Mode
  292.       
  293.    Stream Mode is always used.
  294.    
  295.   HTTP  
  296.   
  297.    The HTTP protocol specifies that the path is handled transparently
  298.    by those who handle URLs, except for the servers which de-reference
  299.    them.   The path is passed by the client to the server with any
  300.    request, but is not otherwise understood by the client.  The
  301.    fragmentid part is not sent with the request.  The search part, if
  302.    present, is sent. Spaces and control characters in URLs must be
  303.    escaped for transmission in HTTP.
  304.    
  305.   GOPHER
  306.   
  307.    Gopher selector strings are, in general, interpreted as a sequence
  308.    of 8-bit bytes which may contain any characters other than tab,
  309.    return, or linefeed. It is necessary to encode any characters
  310.    disallowed in a URL, including spaces and other binary data not in
  311.    the allowed character set, using the standard convention of the "%"
  312.     character followed by two hexadecimal digits.
  313.    
  314.     Note that slash "/" in gopher selector strings may not correspond 
  315.    to a level in a  hierarchical structure.
  316.    
  317.     The format of a gopher URL is: 
  318.    
  319.       1. A single-character field to denote the Gopher type of the
  320.       resource to which the URL refers. 
  321.       
  322.       2. The gopher selector string.  Note that some gopher selector
  323.       strings begin with a copy of the gopher type character, in which
  324.       case that character will occur twice consecutively. Also note
  325.       that the gopher selector string may be an empty string since
  326.       this is how  gopher clients refer to the top-level directory on
  327.       a gopher server. 
  328.       
  329.    If the URL does not refer to a Gopher+ item and if there is no
  330.    gopher search  string then parts 3, 4, 5, and 6 of the URL are
  331.    optional  
  332.    
  333.       3. An encoded tab character (%09) to seperate the gopher
  334.       selector string from the optional search string (see 4 below).  
  335.       
  336.       4. The gopher search string.  If the URL refers to a search to
  337.       be submitted to a gopher search engine, the  search string is
  338.       required. Otherwise this is an empty string. 
  339.       
  340.       5. An encoded tab character (%09) to seperate the gopher search
  341.       string from the optional gopher+ string (see 6 below).
  342.       [suggestion: Note that if the URL refers to a  gopher+ item and
  343.       does not have a gopher search string, there will be two  encoded
  344.  
  345.  
  346.  
  347. Berners-Lee                                                          6
  348.  
  349.       tab characters in a row.] 
  350.       
  351.       6. The Gopher+ string. Gopher+ strings consist of a one or more 
  352.       characters and are used to represent information required for
  353.       retrieval  of the Gopher+ item. Gopher+ items may have alternate
  354.       views, arbitrary sets  of attributes, and may have electronic
  355.       forms associated with them. To  accomodate the various Gopher+
  356.       objects, the Gopher+ string in the URL must  accomodate a
  357.       mapping of the information a Gopher+ client sends to the server.
  358.       This makes this section a bit long since we basically cover the
  359.       entire Gopher+ protocol here. 
  360.       
  361.    When a Gopher server returns a directory listing to a client,
  362.    Gopher+ items are tagged with either a "+" (denoting gopher+ items)
  363.    or a "?" (denoting items  which have a +ASK form associated with
  364.    them). A Gopher+ string which is only a  "+" refers to the default
  365.    view (data representation) of the item. To retrieve  this item a
  366.    gopher+ client should send 
  367.    
  368.        a_gopher_selector<tab>+<cr><lf>
  369.  
  370.    to the gopher+ server.
  371.    
  372.    Note that items which have a +ASK asssociated with them (ie.
  373.    Gopher+ items  tagged with a "?") require the client to fetch the
  374.    item's +ASK attribute to  get the form definition, and then ask the
  375.    user to fill out the form and return  the user's responces along
  376.    with the selector string to retrieve the item.  Gopher+ clients
  377.    know how to do this but depend on the "?" tag in the gopher+  item
  378.    description to know when to handle this case. The "?" is used in
  379.    the Gopher+ string to be consistent with Gopher+ protocol's use of
  380.    this symbol.
  381.    
  382.    To refer to the Gopher+ attributes of an item, the Gopher+ string
  383.    might consist of "!" or "$". "!" refers to the all of a gopher+
  384.    item's attributes. "$" refers to all the item attributes for all
  385.    items in a Gopher directory. To retrieve an item or directory's
  386.    attributes, a gopher client will send: 
  387.    
  388.        a_gopher_selector<tab>!<cr><lf>
  389.  
  390.    for items or 
  391.    
  392.        a_gopher_selector<tab>$<cr><lf>
  393.  
  394.    for directories to the gopher+ server.
  395.    
  396.    To refer to specific attributes, the Gopher+ string is
  397.    "!attribute_name" or "$attribute_name". For example, to refer to
  398.    the attribute containing the  abstract of an item, the Gopher+
  399.    string would be "!+ABSTRACT". To refer to  several attributes,
  400.    clients send the server the attribute names seperated by spaces so
  401.    it is neccesary to seperate the attribute names with coded spaces.
  402.  
  403.  
  404.  
  405. Berners-Lee                                                          7
  406.  
  407.    To retrieve a collection of item attributes specified with a
  408.    gopher+ string of "!+ABSTRACT%20+SMELL" a gopher client would send 
  409.    
  410.        a_gopher_selector<tab>!+ABSTRACT +SMELL<cr><lf>
  411.  
  412.    to the gopher server.
  413.    
  414.    Gopher+ allows for optional alternate data representations
  415.    (alternate views) of items. To retrieve a Gopher+ alternate view,
  416.    the gopher+ client sends the appropriate view and language
  417.    identifier (found in the item's +VIEW attribute). To refer to a
  418.    specific Gopher+ alternate view, the URL's Gopher+ string would be
  419.    in the form "+view_name%20language_name". For example, a gopher+
  420.    string of "+application/postscript%20Es_ES" refers to the spanish
  421.    language postscript alternate view of a gopher+ item. To retrieve
  422.    this alternate view the client would send 
  423.    
  424.        a_gopher_selector<tab>+application/postscript Es_ES<cr><lf>
  425.  
  426.    to the gopher server.
  427.    
  428.    The gopher+ string for a URL that refers to an item referenced by
  429.    an ASK form  filled out with specific values is essentially a coded
  430.    version of what the  client sends to the server. The gopher+ string
  431.    will be of the form  
  432.    
  433.   +%091%0D%0A+-1%0D%0Aask_item1_value%0D%0Aask_item2_value%0D%0A.%0D%0
  434.  
  435.    To retrieve this item, the gopher client sends: 
  436.    
  437.        a_gopher_selector<tab>+<tab>1<cr><lf>
  438.        +-1<cr><lf>
  439.        ask_item1_value<cr><lf>
  440.        ask_item2_value<cr><lf>
  441.        .<cr><lf>
  442.  
  443.    to the gopher server.
  444.    
  445.    For a really complex example, consider a URL that refers to an
  446.    alternate view of an item that is referenced with a filled-out
  447.    Gopher +ASK form. The  gopher+ string will be of the form:  
  448.    
  449.  
  450.     +view_name%20language_name%091%0D%0A+-1%0D%0Aask_item1_value%0D%0A
  451.     ask_item2_value%0D%0A.%0D%0A 
  452.  
  453.    To retrieve this item, the gopher client sends: 
  454.    
  455.        a_gopher_selector<tab>+view_name language_name<tab>1<cr><lf>
  456.        +-1<cr><lf>
  457.        ask_item1_value<cr><lf>
  458.        ask_item2_value<cr><lf>
  459.  
  460.  
  461.  
  462. Berners-Lee                                                          8
  463.  
  464.        .<cr><lf>
  465.  
  466.    to the gopher server. 
  467.    
  468.     Summary: gopher+ string part of Gopher URL
  469.     
  470.    To refer to an item which has an ASK form associated with it where
  471.    the  intent is to allow the user to enter values into the form as
  472.    part of the  retrieval process: 
  473.    
  474.    %3F [was: ?]  
  475.  
  476.  
  477.    To refer to all or specific attributes of a gopher item: 
  478.    
  479.    ![attribute_name][%20attribute_name][%20attribute_name]...
  480.  
  481.  
  482.    To refer to all or specific attributes of a gopher directory: 
  483.    
  484.    $[attribute_name][%20attribute_name][%20attribute_name]...
  485.  
  486.  
  487.    To refer to the content of a gopher+ item (including an item
  488.    referred to by specific values in a filled-out ASK form): 
  489.    
  490.    +[view_name[%20language_name]]
  491.     [%091%0D%0A+-1%0D%0Aask_item1_value%0D%0Aask_item2_value...%0D%0A.
  492. %0D%0A]
  493.  
  494.  
  495.  
  496.     Overall summary and examples
  497.     
  498.    The general format of a Gopher URL path refering to a gopher  type
  499.    "T" item is: 
  500.    
  501.   gopher://host [port]/T[gopher_selector]%09[search_string]%09[gopher+
  502. _string]
  503.  
  504.  
  505.       Examples:
  506.       
  507.    An example of a URL pointing to a gopher type 0 item (a document)
  508.    is: 
  509.    
  510.   gopher://host [port]/0a_gopher_selector
  511.  
  512.  
  513.    An example of a URL pointing to a gopher type 7 item (a search
  514.    engine) where the string foobar is to be submitted to the search
  515.    engine is: 
  516.    
  517.  
  518.  
  519.  
  520. Berners-Lee                                                          9
  521.  
  522.   gopher://host [port]/7a_gopher_selector%09foobar
  523.  
  524.  
  525.    An example of a URL pointing to a Gopher+ type 0 item (a document)
  526.    is: 
  527.    
  528.   gopher://host [port]/0a_gopher_selector%09%09some_gplus_stuff
  529.  
  530.  
  531.    An example of a URL pointing to a Gopher+ type 0 (document) item's
  532.    attribute  information is: 
  533.    
  534.   gopher://host [port]/0a_gopher_selector%09%09!
  535.  
  536.  
  537.    An example of a URL pointing to a Gopher+ document's spanish
  538.    postscript representation is: 
  539.    
  540.   gopher://host [port]/0a_gopher_selector%09%09+application/postscript
  541. %20Es_ES
  542.  
  543.    .
  544.    
  545.   MAILTO
  546.   
  547.    This allows a URL to specify an RFC822 addr-spec mail address. 
  548.    Note that use of % , for example as used in forming a gatewayed
  549.    mail address, requires conversion to %25 in a URL.
  550.    
  551.   NEWS
  552.   
  553.    The news locators refer to either news group names or article
  554.    message identifiers which must conform to the rules for a
  555.    Message-Idof RFC 1036 (Horton 1987).  A message identifier may be
  556.    distinguished from a news group name by the presence of the
  557.    commercial at "@" character. These rules imply that within an
  558.    article, a reference to a news group or to another article will be
  559.    a valid URL (in the partial form). 
  560.    
  561.    A news URL may be dereferenced using NNTP (RFC977, Kantor 86)  (The
  562.    ARTICLE by message-id command ) or using any other protocol for the
  563.    conveyance of usenet news articles, or by reference to a body of
  564.    news articles already received. 
  565.    
  566.       Note1: 
  567.       
  568.    Among URLs the "news" URLs are anomalous in that they are
  569.    location-independent. They are unsuitable as URN candidates because
  570.    the NNTP architecture relies on the expiry of articles and
  571.    therefore a small number of articles being available at any time. 
  572.    When a news: URL is quoted, the assumption is that the reader will
  573.    fetch the article or group from his or her local news host.  News
  574.    host names are NOT part of news URLs. 
  575.  
  576.  
  577.  
  578. Berners-Lee                                                          10
  579.  
  580.       Note 2:
  581.       
  582.    An outstanding problem is that the message identifier is
  583.    insufficient to allow the retrieval of an expired article, as no
  584.    algorithm exists for deriving an archive site and file name. The
  585.    addition of the date and news group set to the article's URL would
  586.    allow this if a directory existed of archive sites by news group.
  587.    Suggested subject of study in conjunction with NNTP working group. 
  588.    Further extension possible may be to allow the naming of subject
  589.    threads as addressable objects.
  590.    
  591.     NNTP
  592.     
  593.    This is an alternative form of reference for news articles,
  594.    specifically to be used with NNTP servers, and particularly those
  595.    incomplete server implementations which do not allow retrieval by
  596.    message identifier.  In all other cases the "news" scheme should be
  597.    used.
  598.    
  599.    The news server name, newsgroup name, and index number of an
  600.    article within the newsgroup on that particular server are given.  
  601.    The NNTP protocol must be used. 
  602.    
  603.       Note1.
  604.       
  605.    This form of URL is not of global accessability, as typically NNTP
  606.    servers only allow access from local clients.   Note that the
  607.    article numbers within groups vary from server to server.
  608.    
  609.    This form or URL should not be quoted outside this local area.  It
  610.    should not be used within news articles for wider circulation than
  611.    the one server.  This is a local identifier for a resource which is
  612.    often available globally, and so is not recommended except in the
  613.    case in which incomplete NNTP implementations on the local server
  614.    force its adoption.
  615.    
  616.   PROSPERO  
  617.   
  618.    The Prospero (Neuman, 1991) directory service is used to resolve
  619.    the URL yielding an access method for the object (which can then
  620.    itself be represented as a URL if translated). The host part
  621.    contains a host name or internet address.  The port part is
  622.    optional.  
  623.    
  624.    The path part contains a host specific object name and an optional
  625.    version number. If present, the version number is separated from
  626.    the  host specific object name by the characters "%00" (percent
  627.    zero zero), this being an escaped string terminator (null).
  628.    External Prospero links are represented as URLs of the underlying
  629.    access method and are not represented as Prospero URLs.
  630.    
  631.   TELNET, RLOGIN, TN3270  
  632.   
  633.  
  634.  
  635.  
  636. Berners-Lee                                                          11
  637.  
  638.    The use of URLs to represent interactive sessions is a convenient
  639.    extension to their uses for objects.  This allows access to
  640.    information systems which only provide an interactive service, and
  641.    no information server. As information within the service cannot be
  642.    addressed individually or, in general, automatically retrieved,
  643.    this is a less desirable, though currently common, solution.
  644.    
  645.   WAIS  
  646.   
  647.    The current WAIS implementation public domain requires that a
  648.    client know the "type" of a object prior to retrieval. This value
  649.    is returned along with the internal object identifier in the search
  650.    response. It has been encoded into the path part of the URL in
  651.    order to make the URL sufficient for the retrieval of the object.
  652.    Within the WAIS world, names do not of course need to be prefixed
  653.    by "wais:"  (by the partial form rules).
  654.    
  655.    The wpath of a WAIS URL consists of encoded fields of the WAIS
  656.    identifier, in the same order as inthe WAIS identifier. For each
  657.    field, the identifier field number is the digits before the equals
  658.    sign, and the field contents follow, encoded in the conventional
  659.    encoding, terminated by ";".
  660.    
  661.     
  662.    
  663.   REGISTRATION OF NAMING SCHEMES  
  664.   
  665.    A new naming scheme may be introduced by defining a mapping onto a
  666.    conforming URL syntax, using a new prefix. Experimental prefixes
  667.    may be used by mutual agreement between parties, and must start
  668.    with the characters "x-".  The scheme name "urn:" is reserved for
  669.    the work in progress on a scheme for more persistent names.  
  670.    
  671.    It is proposed that the Internet Assigned Numbers Authority (IANA)
  672.    perform the function of registration of new schemes. Any submission
  673.    of a new URI scheme must include a definition of an algorithm for
  674.    the retrieval of any object within that scheme. The algorithm must
  675.    take  the URI and produce either a set of URL(s) which will lead to
  676.    the desired object, or the object itself, in a well-defined or
  677.    determinable format.
  678.    
  679.    It is recommended that those proposing a new scheme demonstrate its
  680.    utility and operability by the provision of a gateway which will
  681.    provide images of objects in the new scheme for clients using an
  682.    existing protocol. If the new scheme is not a locator scheme, then
  683.    the properties of names in the new space should be clearly defined.
  684.     It is likewise recommended that, where a protocol allows for
  685.    retrieval by URL, that the client software have provision for being
  686.    configured to use specific gateway locators for indirect access
  687.    through new naming schemes.
  688.    
  689. BNF for specific URL schemes
  690.  
  691.  
  692.  
  693.  
  694. Berners-Lee                                                          12
  695.  
  696.    This is a BNF-like description of the Uniform Resource Locator
  697.    syntax. A vertical  line "|"  indicates alternatives, and
  698.    [brackets]  indicate optional parts.  Spaces are represented by the
  699.    word "space", and the vertical line character by "vline".   Single
  700.    letters stand for single letters. All words of more than one letter
  701.    below are entities described somewhere in this description.  
  702.    
  703.    The current IETF URI working group preference  is for the
  704.    prefixedurl production. (Nov 1993. July 93: url).
  705.    
  706.    The "national" and "punctuation" characters do not appear in any
  707.    productions and therefore may not appear in URLs.
  708.    
  709.    The "afsaddress" is left in as historical note, but is not a url
  710.    production 
  711.    
  712.   prefixedurl             u r l : url 
  713.                          
  714.   ur l                    httpaddress | ftpaddress | newsaddress |
  715.                          nntpaddress | prosperoaddress | telnetaddress
  716.                           | gopheraddress | waisaddress |
  717.                          mailtoaddress  | midaddress | cidaddress 
  718.                          
  719.   scheme                  ialpha   
  720.                          
  721.   httpaddress             h t t p :   / / hostport [  / path ] [ ?
  722.                          search ]   
  723.                          
  724.   ftpaddress              f t p : / / login / path [ ! ftptype ] 
  725.                          
  726.   afsaddress              a f s : / / cellname / path   
  727.                          
  728.   newsaddress             n e w s : groupart   
  729.                          
  730.   nntpaddress             n n t p : group /  digits 
  731.                          
  732.   midaddress              m i d  :  addr-spec 
  733.                          
  734.   cidaddress              c i d : content-identifier 
  735.                          
  736.   mailtoaddress           m a i l t o : : xalphas @ hostname 
  737.                          
  738.   waisaddress             waisindex | waisdoc  
  739.                          
  740.   waisindex               w a i s : / / hostport / database [ ? search
  741.                          ]   
  742.                          
  743.   waisdoc                 w a i s : / / hostport / database / wtype  /
  744.                          wpath 
  745.                          
  746.   wpath                  digits = path ;  [ wpath ] 
  747.                          
  748.   groupart                * | group | article   
  749.  
  750.  
  751.  
  752. Berners-Lee                                                          13
  753.  
  754.   group                   ialpha [ . group ]   
  755.                          
  756.   article                 xalphas @ host   
  757.                          
  758.   database                xalphas   
  759.                          
  760.   wtype                   xalphas   
  761.                          
  762.   prosperoaddress         prosperolink   
  763.                          
  764.   prosperolink            p r o s p e r o : / / hostport / hsoname [ %
  765.                           0 0 version [ attributes ] ]   
  766.                          
  767.   hsoname                 path   
  768.                          
  769.   version                 digits   
  770.                          
  771.   attributes              attribute [ attributes ]   
  772.                          
  773.   attribute               alphanums   
  774.                          
  775.   telnetaddress           t e l n e t : / / login 
  776.                          
  777.   gopheraddress           g o p h e r : / / hostport [/ gtype  [
  778.                          selector ] ] [ ? search ]   
  779.                          
  780.   login                   [ user [ : password ] @ ] hostport 
  781.                          
  782.   hostport                host [ : port ]   
  783.                          
  784.   host                    hostname | hostnumber   
  785.                          
  786.   ftptype                 A | I | D 
  787.                          
  788.   cellname                hostname   
  789.                          
  790.   hostname                ialpha [  .  hostname ] 
  791.                          
  792.   hostnumber              digits . digits . digits . digits 
  793.                          
  794.   port                    digits   
  795.                          
  796.   selector                path   
  797.                          
  798.   path                    void |  segment  [  / path ] 
  799.                          
  800.   segment                 xpalphas 
  801.                          
  802.   search                  xalphas [ + search ]   
  803.                          
  804.   user                    xalphas  
  805.                          
  806.   password                xalphas 
  807.  
  808.  
  809.  
  810. Berners-Lee                                                          14
  811.  
  812.   fragmentid              xalphas   
  813.                          
  814.   gtype                   xalpha   
  815.                          
  816.   xalpha                  alpha | digit | safe | extra | escape   
  817.                          
  818.   xalphas                 xalpha [ xalphas ]   
  819.                          
  820.   xpalpha                 xalpha | +   
  821.                          
  822.   xpalphas                xpalpha [ xpalpha ]   
  823.                          
  824.   ialpha                  alpha [ xalphas ] 
  825.                          
  826.   alpha                   a | b | c | d | e | f | g | h | i | j | k |
  827.                          l | m | n | o  | p | q | r | s | t | u | v |
  828.                          w | x | y | z | A | B | C  | D | E | F | G |
  829.                          H | I | J | K | L | M | N | O | P |  Q | R |
  830.                          S | T | U | V | W | X | Y | Z   
  831.                          
  832.   digit                   0 |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9   
  833.                          
  834.   safe                    $ | - | _ | @ | . | &  | + | - 
  835.                          
  836.   extra                   " |  ' | ( | )  | ,  | space   
  837.                          
  838.   reserved                 =  |  ;  |  /  |  #  |  ? |  : 
  839.                          
  840.   escape                  % hex hex   
  841.                          
  842.   hex                     digit | a | b | c | d | e | f | A | B | C |
  843.                          D | E | F   
  844.                          
  845.   national                { | } | vline | [ | ] | \ | ^ | ~   
  846.                          
  847.   punctuation             < | > 
  848.                          
  849.   digits                  digit [ digits ]   
  850.                          
  851.   alphanum                alpha | digit   
  852.                          
  853.   alphanums               alphanum [ alphanums ] 
  854.                          
  855.   void                   
  856.                          
  857.    (end of URL BNF)      
  858.    
  859. Security considerations  
  860.  
  861.    The URL scheme does not in itself pose a security threat. Users
  862.    should beware that there is no general guarantee that a URL which
  863.    at one time points to a given object continues to do so, and does
  864.    not even at some later time point to a different object due to the
  865.  
  866.  
  867.  
  868. Berners-Lee                                                          15
  869.  
  870.    movement of objects on servers.
  871.    
  872.    A URL-related security threat is that it is sometimes possible to
  873.    construct a URL such that an attempt to perform a harmless
  874.    idempotent operation such as the retrieval of the object will in
  875.    fact cause a possibly damaging remote operation to occur.  The
  876.    unsafe URL is typically constructed by specifying a port number
  877.    other than that reserved for the network protocol in question.  The
  878.    client unwittingly contacts a server which is in fact running a
  879.    different protocol.  The content of the URL contains instructions
  880.    which when interpreted according to this other protocol cause an
  881.    unexpected ooperation. An example has been the use of gopher URLs
  882.    to cause a rude message to be sent via a SMTP server.  Caution
  883.    should be used when using any URL which specifies a port number
  884.    other than the default for the protocol, especially when it is a
  885.    number within the reserved space.
  886.    
  887.    Care should be taken when URLs contain embedded encoded delimiters
  888.    for a given protocol (for example,  CR and LF characters for telnet
  889.    protocols) that these are not unencoded before transmission.  This
  890.    would violate the protocol but could be used to simulate an extra
  891.    operation or parameter, again causing an unexpected and possible
  892.    harmful remote operation to be performed.
  893.    
  894.    The use of URLs containing passwords is clearly unwise.
  895.    
  896. Acknowledgements  
  897.  
  898.    This paper builds on the basic W3 design and much discussion of
  899.    these issues by many people on the network. The discussion was
  900.    particularly stimulated by articles by Clifford Lynch (1991),
  901.    Brewster Kahle (1991) and Wengyik Yeong (1991b). Contributions from
  902.    John Curran (NEARnet), Clifford Neuman (ISI) Ed Vielmetti (MSEN)
  903.    and later the IETF URL BOF and URI working group have been
  904.    incorporated into this issue of this paper.  
  905.    
  906.    The draft url4  (Internet Draft 00) was generated from url3
  907.    following discussion and overall approval of the URL working group
  908.    on 29 March 1993. The paper url3 had been generated from udi2 in
  909.    the light of discussion at the UDI BOF meeting at the Boston IETF
  910.    in July 1992. Draft url4 was Internet Draft 00. Draft url5
  911.    incorporated changes suggested by Clifford Neuman, and draft url6
  912.    (ID 01) incorporated character group changes and a few other fixes
  913.    defined by the IETF URI WG in submitting it as a proposed standard.
  914.     URL7 (Internet Draft 02) incorporated changes introduced at the
  915.    Amsterdam IETF and refined in net discussion. 
  916.    
  917.    The draft 03 includes changes made at Houston in Nov 93, and on the
  918.    net before Seattle March 1994.
  919.    
  920.                               APPENDICES
  921.                                    
  922.    The following are not formally part of this document.
  923.  
  924.  
  925.  
  926. Berners-Lee                                                          16
  927.  
  928. Wrappers for URIs in plain text
  929.  
  930.    This section does not formally form part of the URL specification .
  931.    
  932.    URIs, including URLs, will ideally be transmitted though protocols
  933.    which accept them and data formats which define a context for them.
  934.     However, in practice nowadays there are many occasions when URLs
  935.    are included in plain ASCII non-marked-up text such as electronic
  936.    mail and usenet news messages.
  937.    
  938.    In this case, it is convenient to have a separate wrapper syntax to
  939.    define delimiters which will enable the human or automated reader
  940.    to recognize that the URI is a URI.
  941.    
  942.    The recommendation is that the angle brackets (less than and
  943.    greater than signs) of the ASCII set be used for this purpose.
  944.    
  945.    These wrappers do not form part of the URL, are not mandatory, and
  946.    should not be used in contexts (such as SGML parameters, HTTP
  947.    requests, etc) in which delimiters are already specified. 
  948.    
  949.     Example
  950.     
  951. Yes, Jim, I found it under <ftp://info.cern.ch/pub/www/doc> but
  952.     you can probably pick it up from <ftp://ds.internic.net/rfc>.
  953.  
  954.  
  955.  
  956.                               REFERENCES
  957.                                    
  958.   Alberti, R., et.al.  (1991) 
  959.                           "Notes on the Internet Gopher  Protocol"
  960.                          University of Minnesota, December 1991, 
  961.                          <ftp://boombox.micro.umn.edu/pub/gopher/
  962.                          gopher_protocol> . See also 
  963.                          <gopher://gopher.micro.umn.edu/00/Information
  964.                          About Gopher/About Gopher> 
  965.                          
  966.   Berners-Lee, T ., (1991) 
  967.                           "Hypertext Transfer Protocol (HTTP)" , CERN,
  968.                          December 1991, as updated from time to time, 
  969.                          <ftp://info.cern.ch/pub/www/doc/http-spec.txt
  970.                          > 
  971.                          
  972.   Crocker                "Standard for ARPA Internet Text Messages" .
  973.                          David H. Crocker, RFC822,  
  974.                          
  975.   Davis, F, et  al., (1990) 
  976.                           "WAIS Interface Protocol: Prototype 
  977.                          Functional Specification", Thinking Machines
  978.                          Corporation,  April 23, 1990 
  979.                          <ftp://quake.think.com/pub/wa
  980.                          is/doc/protspec.txt> 
  981.  
  982.  
  983.  
  984. Berners-Lee                                                          17
  985.  
  986.   International Standards Organization, (1991) 
  987.                           Information and  Documentation - Search and
  988.                          Retrieve Application Protocol  Specification
  989.                          for open Systems Interconnection, ISO-10163 
  990.                          
  991.   Horton (1987)           M. Horton, R. Adams, "Standard for
  992.                          interchange of USENET messages", Internet RFC
  993.                          1036 , 12/01/1987. 
  994.                          
  995.   Huitema, C., (1991)     "Naming: strategies and techniques", 
  996.                          Computer Networks and ISDN Systems 23 (1991)
  997.                          107-110. 
  998.                          
  999.   Kahle, Brewster, (1991)  
  1000.                          "Document Identifiers,  or  International
  1001.                          Standard Book Numbers for the Electronic
  1002.                          Age",
  1003.                          <ftp:
  1004.                          //quake.think.com/pub/wais/doc/doc-ids.txt> 
  1005.                          
  1006.   Kantor, B., and Lapsley, P., (1986) 
  1007.                          "A proposed standard for  the stream-based
  1008.                          transmission of news" , Internet RFC-977,
  1009.                          February 1986.
  1010.                          <ftp://ds.internic.net/rfc/rfc977.txt> 
  1011.                          
  1012.   Kunze, 1994             J. Kunze, Requirements for URLs, to be
  1013.                          published. 
  1014.                          
  1015.   Lynch, C., Coallition for Networked Information: (1991)   
  1016.                          "Workshop on ID and Reference Structures for
  1017.                          Networked Information", November 1991. See
  1018.                          <wais://quake.think.com/wais-discussion-ar
  1019.                          chives?lynch> 
  1020.                          
  1021.   Mockapetris, P., (1987) 
  1022.                           "Domain names + concepts and  facilities",
  1023.                          RFC-1034, USC-ISI, November 1987, 
  1024.                          <ftp://ds.internic.net/rfc/rfc1034.txt> 
  1025.                          
  1026.   Neuman, B. Clifford, (1992) 
  1027.                           "Prospero: A Tool for Organizing  Internet
  1028.                          Resources", Electronic Networking: Research,
  1029.                          Applications and Policy, Vol 1 No 2, Meckler
  1030.                          Westport CT  USA.  See also 
  1031.                          <ftp://prospero.isi.edu/pub/prospero/oir.ps> 
  1032.                          
  1033.   Postel, J. and Reynolds, J. (1985) 
  1034.                          "File Transfer Protocol  (FTP)", Internet
  1035.                          RFC-959, October 1985.
  1036.                          <ftp://ds.internic.net/rfc/rfc959.txt> 
  1037.                          
  1038.   Sollins 1994            K. Sollins and L. Masinter, Requiremnets for
  1039.  
  1040.  
  1041.  
  1042. Berners-Lee                                                          18
  1043.  
  1044.                          URNs, to be published. 
  1045.                          
  1046.   Yeong, W., (1991a)      "Towards Networked Information Retrieval", 
  1047.                          Technical report 91-06-25-01, June 1991,
  1048.                          Performance Systems International, Inc. 
  1049.                          <ftp://uu.psi.com/wp/nir.txt> 
  1050.                          
  1051.   Yeong, W., (1991b),     "Representing Public Archives in the 
  1052.                          Directory", Internet Draft, November 1991,
  1053.                          now expired. 
  1054.                          
  1055.    .
  1056.    
  1057.                           EDITOR'S ADDRESS  
  1058.                                    
  1059.                            Tim Berners-Lee  
  1060.                 Address:   World-Wide Web project  
  1061.                            CERN,
  1062.                            1211 Geneva 23,
  1063.                            Switzerland
  1064.  
  1065.                 Telephone: +41 (22)767 3755
  1066.                 Fax:       +41 (22)767 7155 
  1067.                 Email:     timbl@info.cern.ch
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.    
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101. Berners-Lee                                                          19
  1102.  
  1103.